#!/bin/bash

sqoop import \
--connect jdbc:mysql://cheng:1101/huelkq11 \
--username niit \
--password 123456 \
--table $1 \
--num-mappers 1 \
--hive-import \
--hive-database stuinfo \
--hive-table sign \
--delete-target-dir
--create-hive-table

if [ $? -eq 0 ]; then
  echo "Sqoop导入数据成功"
else
  echo "Sqoop导入数据失败"
fi
